$light-red: #f0cccc;
$dark-red: #a90000;

$light-green: #ccf0cc;
$dark-green: #00b700;

$light-yellow: #f0f096;
$dark-yellow: #f0f086;

$light-grey: #ccc;
$dark-grey: #444;

h2.project {
  em.project_ruby {
    font-size: 12px;
  }

  .project_status {
    padding-left: 10px;
    font-size: 14px;
  }
}

.project_heading {
  position: relative;
  border-top-right-radius: 8px;
  border-top-left-radius: 8px;
  line-height: 30px;
  height: 30px;
  padding: 0;

  h2 {
   margin: 0;
   padding: 0;
  }

  .project {
    padding-left: 10px;
  }

  .force_build {
    position: absolute;
    top: 0;
    right: 0;
  }

  form input{
    display: block;
    float: right;
    height: 30px;
    background-color: #444;
    color: #fff;
    border: 0;
    border-top-right-radius: 8px;}

}

li.build {
  .name { width: 85px; }
  .revision { width: 50px; }
  .timestamp { width: 139px; }
  .build-pointer { width: 5px; }
  a { color: black }

  &.passed {
    background-color: $light-green;
    &:hover  { background-color: #96ff96; }
  }

  &.failed, &.timeout {
    background-color: $light-red;
    &:hover  { background-color: #ff9696; }
  }

  &.building {
    background-color: $light-yellow;
    &:hover  { background-color: #f0f064; }
  }

  &.cancelled {
    background-color: $light-grey;
    &:hover  { background-color: #aaaaaa; }
  }
}

.latest-build {
  float: right;
  width: 700px;
  background: #fff;
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
  border-radius: 8px;

  .project_heading {
    &.passed { background-color: $light-green; }
    &.failed, &.timeout { background-color: $light-red; }
    &.building { background-color: $light-yellow; }
    &.cancelled { background-color: $light-grey; }
  }

  pre{
    line-height: 12px;
    float: right;
    white-space: pre-wrap;
    width: 670px;
  }
}

.past-builds {
  float: left;
  width: 300px;
  background: #fff;
  border-radius: 8px;
  padding: 0 0 20px 0;
  box-shadow: 0 0 5px rgba(0,0,0,0.5);

  h3{
    margin: 0;
    padding: 0 10px;
    line-height: 30px;
  }

  ul {
    display: table;
    margin: 0;
    width: 300px;
    position: relative;

    li.build {
      text-align: right;
      line-height: 30px;
      height: 30px;
      padding: 0 10px 0 20px;
      list-style-type: none;
      position: relative;
      font-style: italic;
      cursor: pointer;

      span{font-style: normal;}
    }

    li.build.selected.passed{background: $dark-green;}
    li.build.selected.failed{background: $dark-red;}
    li.build.selected.timeout{background: $dark-red;}
    li.build.selected.building{background: $dark-yellow;}
    li.build.selected.cancelled{background: $dark-grey;}

    li.build a{
        color: $dark-grey;
        font-weight: bold;
        font-style: normal;
        text-decoration: none;
        float:left;
      }
    li.build .revision a{ float: none; }

    li.build.selected a, li.build.selected{
      color: #fff;
    }

    li.build.selected span.build-pointer{
      width: 0;
      height: 0;
      border: solid 10px #fff;
      border-left: none;
      border-top: solid 10px transparent;
      border-bottom: solid 10px  transparent;
      display: block;
      position: absolute;
      right: -20px;
      margin-top: -25px;
    }
  }
}

a.external-link {
  background: url("/assets/external_icon.png") no-repeat scroll right center transparent;
  padding-right: 13px;
}
